package algutil.partagemusic.filter;

import java.io.File;
import java.io.FileFilter;

import org.apache.log4j.Logger;

import algutil.partagemusic.option.Options;


public class MyToGetFileFilter implements FileFilter {

	private final static Logger log = Logger.getLogger(MyToGetFileFilter.class);

	private static String currentUser;

	static {
		currentUser = Options.getInstance().whoAmI();
	}

	public boolean accept(File pathname) {

		if (pathname.isDirectory()) {
			return false;
		} else {
			if (pathname.getName().startsWith("toget_4" + currentUser + "_")) {
				return true;
			}
		}
		return false;
	}
}
